New order
POST/bot-gateway-service/api/v3/order
Send in a new order.
LIMIT_MAKER
areLIMIT
orders that will be rejected if they immediately match and trade as a taker.STOP_LOSS
andTAKE_PROFIT
will execute aMARKET
order when thestopPrice
is reached.- Any
LIMIT
orLIMIT_MAKER
type order can make an iceberg order by sending anicebergQty
. - Any order with an
icebergQty
MUST havetimeInForce
set toGTC
. MARKET
orders usingquantity
specify how much a user wants to buy or sell based on the market price.MARKET
orders usingquoteOrderQty
specify the amount the user wants to spend (when buying) or receive (when selling) of the quote asset; the correct quantity will be determined based on the market liquidity andquoteOrderQty
.MARKET
orders usingquoteOrderQty
will not breakLOT_SIZE
filter rules; the order will execute a quantity that will have the notional value as close as possible toquoteOrderQty
.- The same
newClientOrderId
can be accepted only when the previous one is filled. otherwise, the order will be rejected. Trigger order price rules against market price for bothMARKET
andLIMIT
versions: - Price above market price:
STOP_LOSS
BUY
,TAKE_PROFIT
SELL
. - Price below market price:
STOP_LOSS
SELL
,TAKE_PROFIT
BUY
.
Request
- application/json
- text/json
- application/*+json
Body
New order
submission request.
Possible values
:- LIMIT
- MARKET
- STOP_LOSS_LIMIT
- TAKE_PROFIT_LIMIT
- STOP_LOSS_LIMIT
- LIMIT_MAKER
- STOP_LOSS
- TAKE_PROFIT
Possible values
:- Good till Canceled (GTC)
- Immediate or Cancel (IOC)
- Fill-Or-Kill (FOK)
- Identify an order as part of a strategy.
- The value cannot be less than 1000000.
- Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders.
- Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders.
- Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order.
- Set the response JSON.
- MARKET and LIMIT order types default to FULL, all other orders default to ACK.
- RecvWindow is optional.
- The value cannot be greater than 60000.
- If recvWindow is not sent, it defaults to 5000.
Symbol of the trading pair (e.g., XCBETH).
Order side: e.g. BUY or SELL (required).
Order type , e.g. LIMIT (required).
Order time in force (optional).
The quantity of the asset to buy or sell. (required)
The quote order quantity (optional).
The price per unit of the asset (required for limit order).
The unique identifier for the order provided by the client (e.g., Guid) (required).
The strategy ID for the order (optional).
The type of strategy for the order (optional).
The stop order activation price (optional).
The trailing stop delta for trailing stop orders (optional).
The quantity of the iceberg order (optional).
The type of response expected for the new order (e.g., FULL) (optional).
The number of milliseconds after timestamp the request is valid for (optional).
Body
New order
submission request.
Possible values
:- LIMIT
- MARKET
- STOP_LOSS_LIMIT
- TAKE_PROFIT_LIMIT
- STOP_LOSS_LIMIT
- LIMIT_MAKER
- STOP_LOSS
- TAKE_PROFIT
Possible values
:- Good till Canceled (GTC)
- Immediate or Cancel (IOC)
- Fill-Or-Kill (FOK)
- Identify an order as part of a strategy.
- The value cannot be less than 1000000.
- Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders.
- Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders.
- Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order.
- Set the response JSON.
- MARKET and LIMIT order types default to FULL, all other orders default to ACK.
- RecvWindow is optional.
- The value cannot be greater than 60000.
- If recvWindow is not sent, it defaults to 5000.
Symbol of the trading pair (e.g., XCBETH).
Order side: e.g. BUY or SELL (required).
Order type , e.g. LIMIT (required).
Order time in force (optional).
The quantity of the asset to buy or sell. (required)
The quote order quantity (optional).
The price per unit of the asset (required for limit order).
The unique identifier for the order provided by the client (e.g., Guid) (required).
The strategy ID for the order (optional).
The type of strategy for the order (optional).
The stop order activation price (optional).
The trailing stop delta for trailing stop orders (optional).
The quantity of the iceberg order (optional).
The type of response expected for the new order (e.g., FULL) (optional).
The number of milliseconds after timestamp the request is valid for (optional).
Body
New order
submission request.
Possible values
:- LIMIT
- MARKET
- STOP_LOSS_LIMIT
- TAKE_PROFIT_LIMIT
- STOP_LOSS_LIMIT
- LIMIT_MAKER
- STOP_LOSS
- TAKE_PROFIT
Possible values
:- Good till Canceled (GTC)
- Immediate or Cancel (IOC)
- Fill-Or-Kill (FOK)
- Identify an order as part of a strategy.
- The value cannot be less than 1000000.
- Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders.
- Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders.
- Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order.
- Set the response JSON.
- MARKET and LIMIT order types default to FULL, all other orders default to ACK.
- RecvWindow is optional.
- The value cannot be greater than 60000.
- If recvWindow is not sent, it defaults to 5000.
Symbol of the trading pair (e.g., XCBETH).
Order side: e.g. BUY or SELL (required).
Order type , e.g. LIMIT (required).
Order time in force (optional).
The quantity of the asset to buy or sell. (required)
The quote order quantity (optional).
The price per unit of the asset (required for limit order).
The unique identifier for the order provided by the client (e.g., Guid) (required).
The strategy ID for the order (optional).
The type of strategy for the order (optional).
The stop order activation price (optional).
The trailing stop delta for trailing stop orders (optional).
The quantity of the iceberg order (optional).
The type of response expected for the new order (e.g., FULL) (optional).
The number of milliseconds after timestamp the request is valid for (optional).
Responses
- 200
- 401
Success
- application/json
- Schema
- Example (from schema)
- Example
Schema
- Unless
OCO
, value will be -1 - It is the client’s original ClientOrderId of the order from the request.
- executedQty is how many base asset is matched in the order, which is 0.5 in the above example.
- It is how much the user paid for buying base asset in quote asset.
Possible values
:- NEW
- PARTIALLY_FILLED
- FILLED
- CANCELED
- REJECTED
- EXPIRED
- Possible values:
- Good till Canceled (GTC)
- Immediate or Cancel (IOC)
- Fill-Or-Kill (FOK)
- Possible values:
- LIMIT
- MARKET
- STOP_LOSS_LIMIT
- TAKE_PROFIT_LIMIT
- STOP_LOSS_LIMIT
- LIMIT_MAKER
- STOP_LOSS
- TAKE_PROFIT
- Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders.
- Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order.
- It’s the same “w” field returned from websocket executionReport event.
- Possible values: NONE, EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH
Symbol of the trading pair (e.g., XCBETH).
The unique identifier of the order
of type big integer generated by the Ping Exchange.
The unique identifier of the order list generated by the Ping Exchange.
The unique identifier (Guid) assigned by the client for the order.
The price is the client’s original price of the order from the request.
The original quantity requested by the client.
The quantity of the base asset that has been executed in the order (e.g., 0.5).
The total cost of buying the base asset in the quote asset.
The status of the order.
Order time in force.
Order type , e.g. LIMIT.
Order side: e.g. BUY or SELL.
The stop order activation price.
The quantity of the iceberg order.
The timestamp of the transaction.
The timestamp of the last update.
Indicates if the order is currently placed in the order book or not.
The time when the order was last marked as working.
The original quote order quantity.
The mode for self-trade prevention.
{
"symbol": "XCBETH",
"orderId": 5343,
"orderListId": 12,
"clientOrderId": "09D6C415-996F-4FBA-8C52-22F08D7AF53E",
"price": "0.002",
"origQty": "0.01",
"executedQty": "0.05",
"cummulativeQuoteQty": "0.5",
"status": "NEW",
"timeInForce": "GTC",
"type": "LIMIT",
"side": "BUY",
"stopPrice": "0.1",
"icebergQty": "0.1",
"transactTime": 1643678921,
"updateTime": 1643678921,
"isWorking": true,
"workingTime": 1643678921,
"origQuoteOrderQty": "0.01",
"selfTradePreventionMode": "EXPIRE_TAKER"
}
{
"symbol": "BTCUSDC",
"orderId": 28,
"orderListId": -1,
"clientOrderId": "f57cdf72-b89b-4c8c-8308-ee326ef1f107",
"price": "1000",
"origQty": "0.05",
"executedQty": "0.01",
"cummulativeQuoteQty": "0.01",
"status": "PARTIALLY_FILLED",
"timeInForce": "GTC",
"type": "LIMIT",
"side": "SELL",
"stopPrice": "0.0",
"icebergQty": "0.0",
"transactTime": 1715673764813,
"updateTime": 1715673784813,
"isWorking": true,
"workingTime": 1715673734813,
"origQuoteOrderQty": "0.000000",
"selfTradePreventionMode": "EXPIRE_TAKER"
}
Unauthorized